package com.nai365.nart.seckill.api.feign;

import com.nai365.nart.common.core.constant.SecurityConstants;
import com.nai365.nart.common.core.constant.ServiceNameConstants;
import com.nai365.nart.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 抢购系统
 */
@FeignClient(ServiceNameConstants.SECKILL_SERVICE)
public interface SeckillFeignService {

	@GetMapping(value = "/seckill/kill_inner")
	public R<String> seckill(@RequestParam("spuId") String spuId, @RequestParam("orderType") Integer orderType, @RequestParam("dataId") Long dataId , @RequestParam("userId") Long userId, @RequestHeader(SecurityConstants.FROM) String from);



	@GetMapping(value = "/seckill/close_order_stock_handler")
	public R closeOrderStockHandler(@RequestParam("skuId") Long skuId, @RequestHeader(SecurityConstants.FROM) String from);
	@GetMapping(value = "/seckill/sku_count")
	public R skuCount(@RequestParam("spuId") String spuId, @RequestHeader(SecurityConstants.FROM) String from);

	@GetMapping(value = "/seckill/save_session")
	public R saveSession(@RequestParam("spuId") String spuId, @RequestHeader(SecurityConstants.FROM) String from);
	@GetMapping(value = "/seckill/delete_session")
	public R deleteSession(@RequestParam("spuId") String spuId, @RequestHeader(SecurityConstants.FROM) String from);


}
